package com.supervision.manage.mapper

import com.fly.base.mybatis.sqlprovider.SqlProvider
import com.supervision.domain.bean.po.SmsPO
import com.supervision.domain.bean.vo.SmsTemplateVO
import com.supervision.domain.model.SmsTemplate
import com.supervision.manage.mapper.sqlprovider.SmsTemplateSqlProvider
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Component
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.SelectProvider

@Mapper
@Component
interface SmsTemplateMapper {

    @SelectProvider(type = SqlProvider::class, method = "select")
    fun select(@Param("condition") condition: Any, @Param("otherCondition") otherCondition: String?): List<SmsTemplate>

    @SelectProvider(type = SmsTemplateSqlProvider::class, method = "getSmsTemplateList")
    fun getSmsTemplateList(@Param("po") po: SmsPO, @Param("limitSql") limitSql: String): List<SmsTemplateVO>

    @SelectProvider(type = SmsTemplateSqlProvider::class, method = "getSmsTemplateList")
    fun countSmsTemplateList(@Param("po") po: SmsPO, @Param("limitSql") limitSql: String): Int
}
